package com.lemon.components.ant.beans;

import java.util.List;

import org.hibernate.validator.constraints.NotBlank;

public class EnumInfo {
	
	private List<EnumAttr> attr = null;
	@NotBlank(message="不能为空")
	private String name;
	
	public List<EnumAttr> getAttr() {
		return attr;
	}
	public void setAttr(List<EnumAttr> attr) {
		this.attr = attr;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	@Override
	public String toString() {
		return "{attr:\"" + attr + "\", name:\"" + name + "}";
	}
	
	public static class EnumAttr{
		@NotBlank(message="code不能为空")
		private String code;
		@NotBlank(message="msg不能为空")
		private String msg;
		@NotBlank(message="enumName不能为空")
		private String enumName;
		
		public String getCode() {
			return code;
		}
		public void setCode(String code) {
			this.code = code;
		}
		public String getMsg() {
			return msg;
		}
		public void setMsg(String msg) {
			this.msg = msg;
		}
		@Override
		public String toString() {
			return enumName+"(\""+code+"\", \""+msg+"\")";
		}
		public String getEnumName() {
			return enumName;
		}
		public void setEnumName(String enumName) {
			this.enumName = enumName;
		}
	}
}
